package com.study.demo.mybatisplus.CustomSqlInjector;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.AbstractSqlInjector;
import com.baomidou.mybatisplus.core.injector.methods.*;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * SQL 自定义注入器
 * @author: elvin
 * @time: 2019-02-22 15:11
 * @desc:
 **/
public class CustomSqlInjector extends AbstractSqlInjector {
    @Override
    public List<AbstractMethod> getMethodList() {
        return Stream.of(
                new Delete(),
                new DeleteBatchByIds(),
                new DeleteById(),
                new DeleteByMap(),
                new Insert(),
                new SelectBatchByIds(),
                new SelectById(),
                new SelectByMap(),
                new SelectCount(),
                new SelectList(),
                new SelectMaps(),
                new SelectMapsPage(),
                new SelectObjs(),
                new SelectOne(),
                new SelectPage(),
                new Update(),
                new UpdateById(),
                new UpdateAllColumnById()
        ).collect(Collectors.toList());
    }

  /*  @Override
    public void injectSqlRunner(Configuration configuration) {
        new SqlRunnerInjector().inject(configuration);
    }*/
}
